package com.rykj.qxj.test.statict;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONPObject;
import com.rykj.qxj.server.util.date.DateUtils;

public class D {
	public static void main(String[] args) {
		Map<String,Object> map=new HashMap<String, Object>();
		map.put("Chrome", 56);
		map.put("Edge", 102);
		map.put("Opera", 26);
		map.put("Firefox", 36);
		map.put("Safari", 55);
		map.put("其他", 36);
		
		JSONArray ja=new JSONArray();
		ja.add(map);
		System.out.println(ja.toJSONString());
   
		/*
		SimpleDateFormat sdf3 = new SimpleDateFormat("HH:mm");
		
		 Calendar calendar = Calendar.getInstance();
         calendar.setTime(new Date());
         calendar.set(Calendar.HOUR_OF_DAY, 0);
         calendar.set(Calendar.MINUTE, 0);
         calendar.set(Calendar.SECOND, 0);
         Date zero = calendar.getTime();
		
		for(int i=0;i<24;i++) {
			Date addHowMinute = DateUtils.addHowHour(zero, i);
			String format = sdf3.format(addHowMinute);
			System.out.println(format);
		}*/
		
		SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
		Date addHowDay = DateUtils.addHowDay(new Date(), -1);
		String format = sdf.format(addHowDay);
		System.out.println(format);
		
		
		
	}
	

	

}
